<%@page import="org.istt.web.WebConstants"%>
<%@ include file="/taglibs.jsp"%>
<%
	if (request.getSession().getAttribute(WebConstants.USER_INFO) != null) {
		response.sendRedirect(request.getContextPath() + "/tasks.html?tab=1");
	}
%>
<head>
<title><fmt:message key="login.title" /></title>
</head>
<body>
	<%-- this form-login-page form is also used as the
      form-error-page to ask for a login again.
      --%>
	<c:if test="${not empty param.login_error}">
		<font color="red"> <s:text name="login.invallid_account"/>.<br />
		<br /> <s:text name="login.explain"/>: <c:out
				value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />.
		</font>
	</c:if>

	<form name="f" action="<c:url value='j_spring_security_check'/>"
		method="POST">
		<table>
			<tr>
				<td rowspan="4" width="80px"><img src="${ctx}/images/login.png" align="left" height="64" width="64"></td>
				<td><s:text name="username"/>:</td>
				<td><input type='text' name='j_username'
					value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>' /></td>
				
			</tr>
			<tr>
				<td><s:text name="password"/>:</td>
				<td><input type='password' name='j_password'></td>
			</tr>
			<tr>
				<td><s:text name="login.remember.me"/></td>
				<td><input type="checkbox" name="_spring_security_remember_me"></td>
			</tr>

			<tr>
				<td colspan="2" align="center">
					<button type="submit" class="button" name="submit" onclick="this.blur()">
						<fmt:message key="button.login.title"></fmt:message>
						<img src="${ctx}/images/btn_ok.png" align="left" height="20" width="20">
					</button>
					<button type="reset" class="button" name="reset" onclick="Reset">
						<fmt:message key="button.reset.title"></fmt:message>
						<img src="${ctx}/images/btn_undo.png" align="left" height="20" width="20">
					</button>
				</td>
			</tr>
		</table>

	</form>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
</body>